gbDebug = True;

import os, sys;
from resources.lib import Settings, Main;

sPluginPath, sInstanceId, sCommand = sys.argv;
if gbDebug:
  print "%s: plugin path = %s" % (__file__, sPluginPath);
  print "%s: plugin instance id = %s" % (__file__, sInstanceId);
  print "%s: plugin command = %s" % (__file__, sCommand);
iInstanceId = int(sInstanceId);

sCWD = os.path.dirname(__file__);
sAddonXMLPath = os.path.join(sCWD, "addon.xml");
sSettingsXMLPath = os.path.join(sCWD, "resources", "settings.xml");

oSettings = Settings(sPluginPath, iInstanceId, sCommand, sAddonXMLPath, sSettingsXMLPath);

Main(oSettings);
